import * as apiService from '@/services/api'

/**
 * 获取提现策略配置
 * @param params
 * @returns {Promise<*>}
 *
 */
const getStrategyConfigs = params=> {
  return apiService.post(api.STRATEGY_CONFIGS,params)
};
/**
 * 保存提现策略
 * @param params
 * @returns {Promise<*>}
 *
 */
const updateStrategyConfigs = params=> {
  return apiService.post(api.STRATEGY_SAVE,params)
};
/**
 * 获取策略列表
 * @param params
 * @returns {Promise<*>}
 *
 */
const getStrategyList= params=> {
  return apiService.post(api.STRATEGY_LIST,params)
};
/**
 * 获取策略列表
 * @param params
 * @returns {Promise<*>}
 *
 */
const getRiskStrategyList= params=> {
  return apiService.post(api.RISK_STRATEGY_LIST,params)
};
/**
 * 获取策略详情
 * @param params
 * @returns {Promise<*>}
 *
 */
const getStrategyDetail= params=> {
  return apiService.post(api.STRATEGY_DETAIL,params)
};
/**
 * 新增策略状态
 * @param params
 * @returns {Promise<*>}
 *
 */
const addStrategy = params=> {
  return apiService.post(api.STRATEGY_ADD,params)
};
/**
 * 更新策略状态
 * @param id
 * @param comment 备注
 * @param status 审核结果
 * @returns {Promise<*>}
 *
 */
const updateStrategy = ({id,comment,status})=> {
  return apiService.post(api.STRATEGY_UPDATE,{id,comment,status})
};





/**
 * 新增策略状态
 * @param params
 * @returns {Promise<*>}
 *
 */
const updateRiskStrategy = params=> {
  return apiService.post(api.RISK_STRATEGY_UPDATE,params)
};


/**
 * 新增策略状态
 * @param params
 * @returns {Promise<*>}
 *
 */
const addRiskStrategy = params=> {
  return apiService.post(api.RISK_STRATEGY_ADD,params)
};


/**
 * 新增策略状态
 * @param params
 * @returns {Promise<*>}
 *
 */
const updateRiskStrategyStatusApi = params=> {
  return apiService.post(api.RISK_STRATEGY_STATUS,params)
};
const deleteRiskStrategyStatusApi = params=> {
  return apiService.post(api.RISK_STRATEGY_STATUS_DELETE,params)
};


export {
  updateStrategyConfigs,
  getStrategyConfigs,
  getStrategyList,
  getRiskStrategyList,
  getStrategyDetail,
  addStrategy,
  updateStrategy,
  updateRiskStrategy,
  addRiskStrategy,
  updateRiskStrategyStatusApi,
  deleteRiskStrategyStatusApi,
}
